import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;

public class ConcreteAllyControlCenter extends AllyControlCenter{
    private static Logger logger = LogManager.getLogger(Main.class.getName());

    public ConcreteAllyControlCenter(String allyName) {
        this.allyName = allyName;
    }

    public void notifyObserver(String name){
        for(Observer obs : players){
            if(!((Observer)obs).getName().equalsIgnoreCase(name)){//不能给自己呼救啊
                obs.help();
                logger.debug(obs.getName()+"收到了"+name+"的求助");
            }
        }
    }
}
